﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="manageusers.aspx.cs" Inherits="LiveWebServiceAdmin.ActionPages.manageusers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <div>

        <script src="../Scripts/jq.js" type="text/javascript"></script>

        <script src="../Scripts/thickbox.js" type="text/javascript"></script>

        <script src="../Scripts/valign.js" type="text/javascript"></script>

        <link href="../Styles/thickbox.css" rel="stylesheet" type="text/css" />
    </div>
</head>
<body>
    <form id="form1" runat="server">
    <asp:HiddenField ID="IsCompleted" runat="server" />
    <div class="TB_modal" id="TB_ajaxContent">
        <div id="UserDiv">
            <table>
                <tr>
                    <td>
                        <asp:Label ID="ilbNewLogin" runat="server" Text="Login:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbNewLogin" runat="server" Width="100px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                            ValidationGroup="newUser" ErrorMessage="This field is required" ControlToValidate="tbNewLogin"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="ilbPass1" runat="server" Text="Password:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbPass1" TextMode="Password" runat="server" Width="100px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" Display="Dynamic"
                            ValidationGroup="newUser" ErrorMessage="This field is required" ControlToValidate="tbPass1"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="CompareValidator1" runat="server" Display="Dynamic" ValidationGroup="newUser"
                            ErrorMessage="Passwords are not equal" ControlToValidate="tbPass1" ControlToCompare="tbPass2"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="ilbPass2" runat="server" Text="Repeat password:"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="tbPass2" TextMode="Password" runat="server" Width="100px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" Display="Dynamic"
                            ValidationGroup="newUser" ErrorMessage="This field is required" ControlToValidate="tbPass2"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="CompareValidator2" runat="server" Display="Dynamic" ValidationGroup="newUser"
                            ErrorMessage="Passwords are not equal" ControlToValidate="tbPass2" ControlToCompare="tbPass1"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <asp:Label ID="lblErrorTextNewUser" runat="server" Text="" ForeColor="Red"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnCreateUser" runat="server" Text="Create" OnClick="btnCreateUser_Click"
                            ValidationGroup="newUser" OnClientClick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>

    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            if ($("#IsCompleted").attr("value") != "") {
                parent.tb_remove();
                parent.location.reload();
            };
        });
    </script>

</body>
</html>
